﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Configuration;

namespace Jalal.Library.Utility
{
    public class ValidatorFactory
    {
        public static Validation GetValidator()
        {
            string level = System.Configuration.ConfigurationManager.AppSettings["ValidationLevel"];

            if (level == ValidationLevel.High.ToString())
                return new Validation(ValidationLevel.High);
            else if (level == ValidationLevel.Medium.ToString())
                return new Validation(ValidationLevel.Medium);
            else if (level == ValidationLevel.Low.ToString())
                return new Validation(ValidationLevel.Low);
            else
                return new Validation(ValidationLevel.Medium);
        }
    }
}
